import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from "../views/Home";
import OneChat from "../views/chat/OneChat";
import Profile from "../views/pro/Profile";
import BlogDetail from "../components/art/BlogDetail";
import ArticlePost from "../views/art/ArticlePost";

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
  },{
    path: '/home',
    name: 'Home',
    component: Home,
    children:[
      {
        path: '/chat',
        name: '在线聊天',
        component: OneChat,
      },{
        path: '/profile',
        name: '个人中心',
        component: Profile,
      },{
        path: '/blogDetail',
        name: '博客详情',
        component: BlogDetail,
      }, {
        path: '/editBlog',
        name: '编辑博客',
        component: ArticlePost,
        hidden: true,
      }
    ]
  },
];

const router = new VueRouter({
  routes
});

export default router
